package com.eclab.springbootgo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 页面控制器
 *
 * @author Aiden <a href="mailto:adam602260@gmail.com"/>
 * @version PageController.java v0.1
 * @create 2019-08-28 15:32
 */
@Controller
public class PageController {

    /**
     * message
     * @param model
     * @return
     */
    @GetMapping("/helloworld")
    private String HelloWorld(Model model){
        model.addAttribute("message", "hello world");
        return "message";
    }

    /**
     * signin页面
     * @param model
     * @return
     */
    @GetMapping("/signin")
    private String signinPage(Model model){
        return "signin";
    }

    /**
     * register页面
     * @param model
     * @return
     */
    @GetMapping("/register")
    private String registerPage(Model model){
        return "register";
    }

}